<?php
namespace app\shop\model;
use app\BaseModel;
use think\facade\Db;



class BargainConfig extends BaseModel
{
    //定义表名
    protected $name = 'longbing_card_shop_bargain_config';


    /**
     * @author chenniang
     * @DataTime: 2021-01-19 10:44
     * @功能说明:查询
     */
    public function dataInfo($dis){

        $data = $this->where($dis)->find();

        if(empty($data)){

            $this->insert($dis);

            $data = $this->where($dis)->find();

        }

        return $data->toArray();

    }



    /**
     * @author chenniang
     * @DataTime: 2021-01-19 10:36
     * @功能说明:编辑
     */
   public function dataUpdate($dis,$data){

       $res = $this->where($dis)->update($data);
       
       return $res;

   }













}